Skip to main content

SunSystems Authentication

Interactions with SunSystems must be authenticated using a standard Sun user ID and password. This step will therefore be required for all data connectors that interact with SunSystems. The SecurityProvider endpoint is called with this information, if the credentials are valid Sun returns a security token. This token can then be used for the main API call.

Send Http Request

This step will make the call to the SunSystems Connect security provider. It requires the following information:

  • Url - This should be the publicly-facing URL of the instance of SunSystems Connect that you are calling, the exact URL will depend on how your instance has been configured, it will be something like:

https://sscsubdomain.yourcompanydomain.com/sunsystems-connect/soap/SecurityProvider

  • Method - SSC always uses the 'POST' method.

  • Content - This will be the body of the call. This is in XML format and is structured as follows:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://systemsunion.com/connect/webservices/">
<soapenv:Body>
<web:SecurityProviderAuthenticateRequest>
<web:name>SSC</web:name>
<web:password>xxxxxxxxxxxxx</web:password>
</web:SecurityProviderAuthenticateRequest>
</soapenv:Body>
</soapenv:Envelope>

The key thing here is to ensure that the tags <web:name> and <web:password> are set to the correct credentials for your instance of Sun. The rest of the body is fixed.

  • Request Headers - Most API request require one or more header values, in the case of SSC it needs the SOAP action. This can be provided in JSON format as follows:

{"soapAction":"http://systemsunion.com/connect/webservices/Authenticate"}

As it is being supplied in JSON format be sure to change the option to the right of this field to 'JSON' from 'Literal'.

  • Name - We will need to refer to the response from this request by name in the next step of this process, so give it a name without spaces or special characters.

Text Parser

SunSystems Connect should respond to this request with a security token. This response will also be in XML format, we need to parse this to get to the token, which can then be used in the next step of the connector. This is done using a 'Text Parser' step. This should follow on directly from the 'Send Http Request' step of the process and has the following parameters:

  • Source Type - As SSC will respond with XML, the source type here should be 'application/xml'

  • Source Content - In order to get the response we can use some Javascript as follows:

    return GetSecurityToken.ResponseContent

Note that 'GetSecurityToken' is the name given to the previous stage, use your name here if different.

  • Query Expression Type - In order to parse the data being returned we can construct a query. As the data coming back from Sun is XML this should be selected here so the query will be an XPath. Other systems may require JSON or a Regular Expression to get to the relevant portion of the data.

  • Query Expression - This is the expression to parse the data, in this case an XPath. The security token here is in the root 'response' tag so the expression would simply be a single forward slash.

  • Single Result - In this case we are expecting a single value, not a list and so this should be set to 'Yes'.

  • Name - We will refer to this result later in the process so again give it a name without any spaces or special characters.

Finish

Normally this is only the first part of the process, the results would then be used in the actually SSC request you want to perform. However, if you want to test that this part is working successfully and producing a result you can add a 'Finish' step here. A Javascript output to return the name of the previous step should produce the security token, which will be a long string of characters. Something like:

return SecurityToken.Output

Where 'SecurityToken' is the name of the previous step. You can then click on the 'Output' tab near the top left of the data connector screen and use the 'Test Connector' button to check the results.